import { Request as request } from '@/utils/request'

export const getTotalSchoolOrgs = () => {
  return request({
    url: '/sys-org/total-list',
    method: 'post'
  })
}
export const getOrgs = () => {
  return request({
    url: '/sys-org/tree-list',
    method: 'get'
  })
}

export const getOrgInfo = (id:string) => {
  return request({
    url: `/sys-org/info/${id}`,
    method: 'get'
  })
}

export const saveOrg = (data:any) => {
  return request({
    url: '/sys-org/save',
    method: 'post',
    data
  })
}

export const removeOrg = (id:string) => {
  return request({
    url: `/sys-org/remove/${id}`,
    method: 'delete'
  })
}
